﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ProductAttributeInputModels>" %>

<%@ Import Namespace="ChoViet.Lib.Helpers" %>
<%@ Import Namespace="ChoViet.Admin.ViewModels" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Sửa thông tin rao vặt
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    
    <%if (ViewData["MessageInfo"] == null)
      { %>
    <% using (Html.BeginForm("Edit", "ProductAttribute", FormMethod.Post, new
       {
           id = "adminForm",
           enctype = "multipart/form-data"
       }))
       {%>
    <%= Html.ValidationSummary(true)%>
    <table class="admintable" width="100%">
        <tbody>
            <tr>
                <td class="key">
                    Tên thuộc tính (<font color="red">*</font>)
                </td>
                <td>
                    <%=Html.TextBox("Name", Model.ProductAttributes.Name) %>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Kiểu thuộc tính
                </td>
                <td>
                    <%=Html.DropDownList("Types", Model.ListType, "-- Kiểu thuộc tính --")%>
                </td>
            </tr>
            <tr>
                <td class="key">
                    Giá trị mặc định
                </td>
                <td>
                    <%=Html.TextBox("DefaultValue", Model.ProductAttributes.DefaultValue)%>
                </td>
            </tr>
            <tr>
                <td colspan="2" align="center">
                    <input type="submit" id="btnSave" value="Thêm mới" onclick="return check_extension('ArticleImage','btnSave');" />
                </td>
            </tr>
        </tbody>
    </table>
    <%}
      } %>


</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="Toolbar" runat="server">
    <td>
        <%= Html.Toolbar("Quay về", "/ProductAttribute", "back")%>
    </td>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="Header" runat="server">
	Sửa thông tin rao vặt
</asp:Content>

<asp:Content ID="Content5" ContentPlaceHolderID="Message" runat="server">
    <%=ViewData["MessageInfo"]!=null? "<p class='perror'>"+Html.Encode(ViewData["MessageInfo"])+"</p>":string.Empty%>
</asp:Content>
